<template>
  <h1>子组件:{{ len }}</h1>
  <h1>{{ todos }}</h1>
  <button @click="emit('clear')">断开引用</button>
</template>

<script setup>
import {computed} from 'vue'
    let { todos } = defineProps({todos:Array})

    let len = computed(()=>{
        console.log(todos , '计算属性是否执行?');
        return todos.length
    })
    // 子传父
        let emit = defineEmits(['clear'])

</script>